package Jd;

import javafx.print.Printer;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;

public class LoginAction implements Action{
    @Override
    public void execute(HttpServletRequest request, HttpServletResponse response) throws Exception {
        request.setCharacterEncoding("UTF-8");
        response.setCharacterEncoding("UTF-8");
        response.setContentType("text/html;UTF-8");
        PrintWriter out=response.getWriter();
        String name=request.getParameter("userName");
        String pwd=request.getParameter("userPwd");
        if (name.equals("admin")&& pwd.equals("123")){
            out.println("登录成功！");
        }
    }
}
